package com.lucy.nepu.module.htopic.params;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "横向课题新建参数")
public class HorTopicCreateParams {
    /**
     * 横向课题类型
     */
    @ApiModelProperty(value = "横向课题类型",notes = "自然科学，社会科学")
    @Column(name = "hor_topic_type")
    String horTopicType;

    /**
     * 横向课题级别
     */
    @ApiModelProperty(value = "横向课题级别",notes = "A1,A2,B1等")
    @Column(name = "hor_topic_level")
    String horTopicLevel;

    @DecimalMin("0")
    @ApiModelProperty(value = "横向课题经费",notes = "")
    Double funds;
    /**
     * 横向课题负责人姓名
     */
    @NotBlank(message = "横向课题负责人不可为空")
    @ApiModelProperty(value = "横向课题负责人",notes = "")
    String leader;

    /**
     * 横向课题负责人ID
     */
    @NotNull(message = "横向课题负责人ID不可为空")
    @ApiModelProperty(value = "横向课题负责人ID",notes = "")
    Long leaderId;

    /**
     * 课题编码
     */
    @ApiModelProperty("课题编码")
    @Column(name = "hor_topic_code")
    String horTopicCode;

    /**
     * 横向课题开始日期
     */
    @ApiModelProperty(value = "课题开始日期",notes = "课题开始日期，如2021/11/16")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date startDate;

    /**
     * 纵向课题完成日期
     */
    @ApiModelProperty(value = "课题结束日期",notes = "课题结束日期，如2021/11/16")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date endDate;

    /**
     * 横向课题成员ID列表
     */
    @ApiModelProperty(value = "横向课题成员ID列表",notes = "")
    List<Long> userIdList;

    @NotEmpty(message = "关联文件不可为空")
    @ApiModelProperty(value = "关联文件ID列表")
    List<String> fileIds;

}
